<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PowerVR SDK</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<table width="100%">
  <tr>
    <td width="33%">
      <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
    </td>
    <td width="33%">
      <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
    </td>
    <td width="34%">
      <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
    </td>
  </tr>
</table>
<hr>
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>Manager.h</h1><a href="Manager_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment"></span>
00003 <span class="comment"> @File         Manager.h</span>
00004 <span class="comment"></span>
00005 <span class="comment"> @Title        A simple light manager for use with PVREngine</span>
00006 <span class="comment"></span>
00007 <span class="comment"> @Version      </span>
00008 <span class="comment"></span>
00009 <span class="comment"> @Copyright    Copyright (C)  Imagination Technologies Limited.</span>
00010 <span class="comment"></span>
00011 <span class="comment"> @Platform     Independent - OGL/OGLES/OGLES2 Specific at the moment</span>
00012 <span class="comment"></span>
00013 <span class="comment"> @Description  A class for holding information about lights</span>
00014 <span class="comment"></span>
00015 <span class="comment">******************************************************************************/</span>
00016 
00017 <span class="preprocessor">#ifndef _MANAGER_H_</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define _MANAGER_H_</span>
00019 <span class="preprocessor"></span>
00020 <span class="comment">/******************************************************************************</span>
00021 <span class="comment">Includes</span>
00022 <span class="comment">******************************************************************************/</span>
00023 
00024 <span class="preprocessor">#include "PVRTools.h"</span>
00025 <span class="preprocessor">#include "<a class="code" href="dynamicArray_8h.html">dynamicArray.h</a>"</span>
00026 
00027 <span class="keyword">namespace </span>pvrengine
00028 {
00029 
00030     <span class="comment">/*!***************************************************************************</span>
00031 <span class="comment">    * @Class Manager</span>
00032 <span class="comment">    * @Brief A class for holding information about lights</span>
00033 <span class="comment">    * @Description A class for holding information about lights</span>
00034 <span class="comment">    *****************************************************************************/</span>
00035     <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;
00036     <span class="keyword">class </span>Manager
<a name="l00037"></a><a class="code" href="classpvrengine_1_1Manager.html">00037</a>     {
00038     <span class="keyword">public</span>:
00039         <span class="comment">/*!***************************************************************************</span>
00040 <span class="comment">        @Function           Manager</span>
00041 <span class="comment">        @Description        blank constructor.</span>
00042 <span class="comment">        *****************************************************************************/</span>
00043         <a class="code" href="classpvrengine_1_1Manager.html#a0">Manager</a>(){}
00044 
<a name="l00045"></a><a class="code" href="classpvrengine_1_1Manager.html#a0">00045</a>         <span class="comment">/*!***************************************************************************</span>
00046 <span class="comment">        @Function           ~Manager</span>
00047 <span class="comment">        @Description        destructor.</span>
00048 <span class="comment">        *****************************************************************************/</span>
00049         <span class="keyword">virtual</span> <a class="code" href="classpvrengine_1_1Manager.html#a1">~Manager</a>(){}
00050 
00051         <span class="comment">/*!***************************************************************************</span>
<a name="l00052"></a><a class="code" href="classpvrengine_1_1Manager.html#a1">00052</a> <span class="comment">        @Function           Manager</span>
00053 <span class="comment">        @Input              i32Capacity</span>
00054 <span class="comment">        @Description        constructor taking specific initial capacity value.</span>
00055 <span class="comment">        *****************************************************************************/</span>
00056         <a class="code" href="classpvrengine_1_1Manager.html#a0">Manager</a>(<span class="keywordtype">int</span> i32Capacity)
00057         {
00058             m_daElements.expandToSize(i32Capacity);
00059         }
<a name="l00060"></a><a class="code" href="classpvrengine_1_1Manager.html#a2">00060</a> 
00061         <span class="comment">/*!***************************************************************************</span>
00062 <span class="comment">        @Function           add</span>
00063 <span class="comment">        @Input              pElement - an element of type T*</span>
00064 <span class="comment">        @Return             handle to this element</span>
00065 <span class="comment">        @Description        add an element to this manager.</span>
00066 <span class="comment">        *****************************************************************************/</span>
00067         <span class="keywordtype">void</span> <a class="code" href="classpvrengine_1_1Manager.html#a3">add</a>(T *pElement)
00068         {
00069             m_daElements.append(pElement);
00070         }
00071 
<a name="l00072"></a><a class="code" href="classpvrengine_1_1Manager.html#a3">00072</a>         <span class="comment">/*!***************************************************************************</span>
00073 <span class="comment">        @Function           get</span>
00074 <span class="comment">        @Input              i32Index    index of requested object</span>
00075 <span class="comment">        @Return         bool success</span>
00076 <span class="comment">        @Description        sets the path to the output file.</span>
00077 <span class="comment">        *****************************************************************************/</span>
00078         T*  <a class="code" href="classpvrengine_1_1Manager.html#a4">get</a>(<span class="keywordtype">int</span> i32Index)<span class="keyword"> const</span>
00079 <span class="keyword">        </span>{
00080             <span class="keywordflow">return</span> m_daElements[i32Index];
00081         }
00082 
00083         <span class="comment">/*!***************************************************************************</span>
<a name="l00084"></a><a class="code" href="classpvrengine_1_1Manager.html#a4">00084</a> <span class="comment">        @Function           get</span>
00085 <span class="comment">        @Return             size of store</span>
00086 <span class="comment">        @Description        sets the path to the output file.</span>
00087 <span class="comment">        *****************************************************************************/</span>
00088         <span class="keywordtype">int</span> <a class="code" href="classpvrengine_1_1Manager.html#a5">getSize</a>()<span class="keyword"> const</span>
00089 <span class="keyword">        </span>{
00090             <span class="keywordflow">return</span> m_daElements.getSize();
00091         }
00092 
00093         <span class="comment">/*!***************************************************************************</span>
00094 <span class="comment">        @Function           getAll</span>
<a name="l00095"></a><a class="code" href="classpvrengine_1_1Manager.html#a5">00095</a> <span class="comment">        @Return             the dynamic array of all elements in the manager</span>
00096 <span class="comment">        @Description        Direct access to repository.</span>
00097 <span class="comment">        *****************************************************************************/</span>
00098         <a class="code" href="classdynamicArray.html">dynamicArray&lt;T*&gt;</a>*   <a class="code" href="classpvrengine_1_1Manager.html#a6">getAll</a>(){ <span class="keywordflow">return</span> &amp;m_daElements;}
00099 
00100         <span class="comment">/*!***************************************************************************</span>
00101 <span class="comment">        @Function           sort</span>
00102 <span class="comment">        @Description        Sorts elements</span>
00103 <span class="comment">        *****************************************************************************/</span>
00104         <span class="keywordtype">void</span> <a class="code" href="classpvrengine_1_1Manager.html#a7">sort</a>()
00105         {
<a name="l00106"></a><a class="code" href="classpvrengine_1_1Manager.html#a6">00106</a>             m_daElements.bubbleSortPointers();
00107         }
00108 
00109     <span class="keyword">protected</span>:
00110         <a class="code" href="classdynamicPointerArray.html">dynamicPointerArray&lt;T&gt;</a> m_daElements;    
00111     };
00112 
<a name="l00113"></a><a class="code" href="classpvrengine_1_1Manager.html#a7">00113</a> }
00114 <span class="preprocessor">#endif // _MANAGER_H_</span>
00115 <span class="preprocessor"></span>
00116 <span class="comment">/******************************************************************************</span>
00117 <span class="comment">End of file (Manager.h)</span>
00118 <span class="comment">******************************************************************************/</span>
<a name="l00119"></a><a class="code" href="classpvrengine_1_1Manager.html#p0">00119</a> 
</pre></div><br>
<br>
<P align=left><FONT size=2><STRONG><A 
   href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> � 
   1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
<hr>
<address style="align: left;"><small><FONT color=f0f>
Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
</body>
</html>
